#include<linux/module.h>
#include<linux/kernel.h>
#include<linux/init.h>

MODULE_AUTHOR("Tan xujia");
MODULE_LICENSE("Dual BSD/GPL");

struct aligned1 {
    char a8;
    u16 lun;
};

struct aligned2 {
    char a8;
    u16 lun;
}__attribute__((packed)); /*取消数据对齐*/

struct aligned1 i;
struct aligned2 j;

static
int __init hello_init (void)
{
    printk("i.a8 = %d, i.lun = %d\n", &i.a8, &i.lun);
    printk("j.a8 = %d, j.lun = %d\n", &j.a8, &j.lun);
    printk("sizeof(i) = %d\n", sizeof(i));
    printk("sizeof(j) = %d\n", sizeof(j));
    printk("hello_init\n");
    return 0;
}

static
void __exit hello_exit (void)
{
    printk("hello_exit\n");
}

module_init(hello_init);
module_exit(hello_exit);